package sort.algorithm;

import java.util.ArrayList;
import java.util.List;

import junit.framework.TestCase;
import sort.record.Record;

public class BubbleSortTest extends TestCase {

	public BubbleSortTest(String name) {
		super(name);
	}

	protected void setUp() throws Exception {
		super.setUp();
	}

	protected void tearDown() throws Exception {
		super.tearDown();
	}

	public void testSort() {
		List<Record> recs = new ArrayList<Record>();
		recs.add(new Record(3,"test3"));
		recs.add(new Record(4,"test4"));
		recs.add(new Record(2,"test2"));
		recs.add(new Record(1,"test1"));
		recs.add(new Record(5,"test5"));
//		Record[] sorted = new BubbleSort().sort(recs.toArray(new Record[0]));
//		assertTrue(CheckUtil.check(recs.toArray(new Record[0]), 
//					sorted));
//		for (int i = 0; i < sorted.length; i++) {
//			System.out.println(sorted[i]);
//		}
	}
}
